<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Gets all policies from the Kerberos database</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.kadm5-get-policies" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">kadm5_get_policies</h1>
  <p class="verinfo">(PECL kadm5 &gt;= 0.2.3)</p><p class="refpurpose"><span class="refname">kadm5_get_policies</span> &mdash; <span class="dc-title">Gets all policies from the Kerberos database</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.kadm5-get-policies-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>kadm5_get_policies</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$handle</code></span>
   ) : <span class="type">array</span></div>

  <p class="para rdfs-comment">
   Gets an array containing the policies&#039;s names.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.kadm5-get-policies-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">handle</code></dt>

     <dd>

      <p class="para">
       A KADM5 handle.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.kadm5-get-policies-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns array of policies on success 或者在失败时返回 <strong><code>FALSE</code></strong>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.kadm5-get-policies-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-658">
    <p><strong>Example #1 <span class="function"><strong>kadm5_get_policies()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$handle&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">kadm5_init_with_password</span><span style="color: #007700">(</span><span style="color: #DD0000">"afs-1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"GONICUS.LOCAL"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"admin/admin"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"password"</span><span style="color: #007700">);<br /><br />print&nbsp;</span><span style="color: #DD0000">"&lt;h1&gt;get_policies&lt;/h1&gt;\n"</span><span style="color: #007700">;<br />foreach&nbsp;(</span><span style="color: #0000BB">kadm5_get_policies</span><span style="color: #007700">(</span><span style="color: #0000BB">$handle</span><span style="color: #007700">)&nbsp;as&nbsp;</span><span style="color: #0000BB">$policy</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #0000BB">$policy</span><span style="color: #DD0000">&lt;br&nbsp;/&gt;\n"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">kadm5_destroy</span><span style="color: #007700">(</span><span style="color: #0000BB">$handle</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

   </div>
  </p>
 </div>

</div></div></div></body></html>